package org.dna.mybatis.criteria;

/** Base class for all criterion.
 */
 public interface Criterion {
     /**
      * @return the SQL string to be used for this criterion
      */
     String getSql();

     /**
      * Check parameters for this criterion (and sub criterion in case).
      */
     boolean verify(Criteria criteria);
     
     /**
      * Used to bind the properties with columns provided by the Criteria API.
      * 
      * @throws CriteriaException if any property can't be mapped to a column.
      */
     void bind(Criteria crit) throws CriteriaException;
 }
